import 'package:flutter/material.dart';


void main(List<String> args) {
  runApp(MyApp()) ;
}


//自定义组件

class MyApp extends StatelessWidget {
  const MyApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar:AppBar(
          title: Text("flutter demo"),
        ),
        body:HomeContent(),
      ),
      theme: ThemeData(
        // brightness: Brightness.light,
        primarySwatch: Colors.yellow
      ),
    );


  }
}


class HomeContent extends StatelessWidget {
  const HomeContent({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Center(

    // child:ClipRRect(
    //   borderRadius: BorderRadius.circular(20),
    //   child: ,
    // )

    child:Container(
          child: Text(
            "我是一个文本我是一个文本我是一个文本我是一个文本我是一个文本",
            style: TextStyle(
              fontSize: 18.0,
              color: Colors.black26,
              fontWeight: FontWeight.w400,
              fontStyle:FontStyle.normal,
              decoration:TextDecoration.underline,
              decorationColor:Colors.yellow,
              decorationStyle: TextDecorationStyle.dashed,
              letterSpacing: 5.0,
              //color: Color.fromRGBO(r, g, b, opacity)
            ),
            textAlign: TextAlign.left,
            overflow: TextOverflow.ellipsis,
            maxLines: 2,
          ),
          //alignment: Alignment.topLeft,
          width: 300.0,
          height: 300.0,
          padding: EdgeInsets.all(20.0),
          decoration: BoxDecoration(
            color:Colors.yellow,
            // border: Border(
            //   bottom: BorderSide(
            //     color: Colors.black38,
            //     width: 1.0
            //   )
            // ),
            border: Border.all( color: Colors.red, width: 5.0 ),
            // borderRadius:BorderRadius.all(
            //   Radius.circular(10)
            // )
          ),
          //transform:Matrix4.translationValues(100, 50, 0),
          //transform: Matrix4.rotationZ(-0.3),
          //transform: Matrix4.rotationZ(-0.3),
          transform: Matrix4.diagonal3Values(1.0, 1.0, 0),
        )
    );
  }
}




